//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "ia\fn_disableAIScripts.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_object"];
_object = _this;
if (IS_ARRAY(_this)) then {
DEFAULT_PARAM(_object,0,objNull);
};

if (_object iskindof "Man") then {
	_object setVariable ["asr_ai_sys_aiskill_exclude", true];
	_object setVariable ["zeu_AIBypass", true];
	if (_object != vehicle _object) then {
		(vehicle _object) setVariable ["asr_ai_sys_aiskill_exclude", true];
		(vehicle _object) setVariable ["zeu_AIBypass", true];
	};
} else {
	_object setVariable ["asr_ai_sys_aiskill_exclude", true];
	_object setVariable ["zeu_AIBypass", true];
	{
		_x setVariable ["asr_ai_sys_aiskill_exclude", true];
		_x setVariable ["zeu_AIBypass", true];
	} foreach crew _object;
};
	
TRACE("End");
TMFPROFILERSTOP;